package com.skydonkey.es;

import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;


public interface ESVideoRepository extends ElasticsearchRepository<Video, Long> {

    @Query("{\"match\": {\"title\": \"?0\"}}")
//    @Query("{\"match\": {\"title\": ?0}}")
    Page<Video> findByTitleUsingCustomQuery(@Param("title") String title, Pageable pageable);
}
